import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 28463
 * Date: 2022—06—03
 * Time: 8:37
 */
class MyArray<T> {
    public T[] array = (T[])new Object[10];
    /*public T[] array = new T[10];*/

    public T getPos(int pos) {
        return this.array[pos];
    }
    public void setVal(int pos,T val) {
        this.array[pos] = val;
    }
    public T[] getArray() {
        return array;
    }
}
public class Test01 {

    public static void main(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        myArray.setVal(0,20);
        Integer[] tmp = myArray.getArray();
        System.out.println(Arrays.toString(tmp));
    }
    public static void main1(String[] args) {
        MyArray<Integer> myArray = new MyArray<>();
        myArray.setVal(0,20);

    }
}
